package com.test.designPattern.ch27;

/**
 * @ClassName BusinessDelegate
 * @Description 业务代表
 * @Author 维康
 * @Date 2018/7/2 16:35
 * @Version 1.0
 **/
public class BusinessDelegate {
    //业务查询服务
    private BusinessLookUp lookupService = new BusinessLookUp();
    //业务服务
    private BusinessService businessService;

    private String serviceType;

    public void setServiceType(String serviceType){
        this.serviceType = serviceType;
    }

    public void doTask(){
        businessService = lookupService.getBusinessService(serviceType);
        businessService.doProcessing();
    }
}
